package com.example.myfirstapp;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

import java.util.Timer;
import java.util.TimerTask;

import controller.BaseActivity;

public class CreateRoomActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_room);

        // Toast
        Toast.makeText(this, "Creat Room Waaaa!", Toast.LENGTH_SHORT).show();

        // Exit Intent
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {

                // 销毁活动
                finish();
            }
        }, 1000);
    }

    public static void startAction(Context context) {

        // 显式 Intent
        Intent linkTo = new Intent(context, CreateRoomActivity.class);
        context.startActivity(linkTo);
    }
}
